package com.maxmlr.base.jvm;

import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

/**
 * @ClassName TestOOM
 * @Description 测试OOM
 * @Author maxiao
 * @Date 2020/4/19 下午12:19
 * @Version V1.0
 */
public class TestOOM {
    //-Xms10m -Xmx10m -XX:+PrintGCDetails -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/Users/maxiao/jvm.dump
    public static void main(String[] args) {

        List<String> list = new ArrayList<>();
        while (true){
            list.add(UUID.randomUUID().toString());
        }
    }
}
